namespace JGSY.CMS.LowCode.Platform.Application.Interfaces
{
    /// <summary>
    /// 租户数据管理服务接口
    /// </summary>
    public interface ITenantDataManagementService
    {
        // 数据备份
        Task<object> CreateBackupAsync(Guid tenantId, object request);
        Task<List<object>> GetBackupsAsync(Guid tenantId);
        Task<object> GetBackupAsync(Guid backupId);
        Task DeleteBackupAsync(Guid backupId);
        Task<string> DownloadBackupAsync(Guid backupId);
        
        // 数据恢复
        Task<object> RestoreFromBackupAsync(Guid tenantId, Guid backupId, object request);
        Task<object> GetRestoreJobAsync(Guid jobId);
        Task<List<object>> GetRestoreJobsAsync(Guid tenantId);
        Task CancelRestoreJobAsync(Guid jobId);
        
        // 数据迁移
        Task<object> CreateMigrationJobAsync(Guid sourceTenantId, Guid targetTenantId, object request);
        Task<object> GetMigrationJobAsync(Guid jobId);
        Task<List<object>> GetMigrationJobsAsync(Guid tenantId);
        Task CancelMigrationJobAsync(Guid jobId);
        
        // 数据导入导出
        Task<object> CreateExportJobAsync(Guid tenantId, object request);
        Task<object> CreateImportJobAsync(Guid tenantId, object request);
        Task<object> GetExportJobAsync(Guid jobId);
        Task<object> GetImportJobAsync(Guid jobId);
        Task<string> DownloadExportFileAsync(Guid jobId);
        
        // 数据清理
        Task<object> CreateCleanupJobAsync(Guid tenantId, object request);
        Task<List<object>> GetCleanupJobsAsync(Guid tenantId);
        Task<object> GetCleanupJobAsync(Guid jobId);
        Task CancelCleanupJobAsync(Guid jobId);
        
        // 数据统计
        Task<object> GetDataStatisticsAsync(Guid tenantId);
        Task<object> GetDataGrowthAnalysisAsync(Guid tenantId, DateTime startDate, DateTime endDate);
        Task<List<object>> GetDataSizeByTableAsync(Guid tenantId);
        
        // 数据归档
        Task<object> CreateArchiveJobAsync(Guid tenantId, object request);
        Task<List<object>> GetArchiveJobsAsync(Guid tenantId);
        Task<object> GetArchiveJobAsync(Guid jobId);
        Task CancelArchiveJobAsync(Guid jobId);
        
        // 数据验证
        Task<object> CreateValidationJobAsync(Guid tenantId, object request);
        Task<List<object>> GetValidationJobsAsync(Guid tenantId);
        Task<object> GetValidationJobAsync(Guid jobId);
        Task<List<object>> GetValidationIssuesAsync(Guid jobId);
        
        // 数据同步
        Task<object> CreateSyncJobAsync(Guid tenantId, object request);
        Task<List<object>> GetSyncJobsAsync(Guid tenantId);
        Task<object> GetSyncJobAsync(Guid jobId);
        Task CancelSyncJobAsync(Guid jobId);
        
        // 批量操作
        Task<List<object>> GetAllJobsAsync(Guid tenantId, string? jobType = null);
        Task CancelAllJobsAsync(Guid tenantId, string? jobType = null);
    }
}